package com.example.myactspringboot.controller;

import com.example.myactspringboot.server.Excel2Service;
import com.example.myactspringboot.server.ExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Author Zhouchb
 * @Create 2024-01-02 19:40
 * @Description
 */
@RestController
@RequestMapping("/excel2")
public class Excel2Controller {

    @Autowired
    private Excel2Service service;

    @GetMapping(value = "/export2",produces = "application/json;charset=UTF-8")
    public void export(HttpServletResponse response) throws IOException {
        service.export(response);
//        service.download("response",response);
    }

}
